<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      function Dog(name) {
        this.name = name;
      }
      Dog.prototype.say = function () {
        console.log("say");
      };
      function _new(fn, name) {
        let obj = Object.create(fn.prototype);
        fn.call(obj, name);
        return obj32;
      }
      let dog = _new(Dog, "ss");
      dog.say();
      console.log(dog instanceof Dog);
    </script>
  </body>
</html>
